"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
    return function (target, key) { decorator(target, key, paramIndex); }
};
Object.defineProperty(exports, "__esModule", { value: true });
require("reflect-metadata");
(function () {
    function Test(n) {
        return function (target, fnkey, index) {
            console.log("n,fnkey,index", n, fnkey, index);
            // const args = Reflect.getMetadata("aaa", target, fnkey) || [];
            // args.push(index)
            // Reflect.defineMetadata("aaa",n,target,fnkey);
            // console.log("args",args)
        };
    }
    function Test1(aaa) {
        return function (target, key) {
            console.log("target", target);
            Reflect.defineMetadata("aaa", aaa, target, key);
        };
    }
    var A = /** @class */ (function () {
        function A() {
        }
        A.prototype.fn1 = function (a, b) {
            return a;
        };
        __decorate([
            Test1(124413123)
        ], A.prototype, "aaa", void 0);
        __decorate([
            __param(0, Test(1)),
            __param(1, Test(2))
        ], A.prototype, "fn1", null);
        return A;
    }());
    // var a = new A({a:"1231"})
    // var a = new A()
    console.log("A.prototype", Reflect.getMetadata("aaa", A.prototype, 'aaa'));
    console.log("new A()", Reflect.getMetadata("aaa", new A(), 'aaa'));
    // console.log("a=",a)
    // console.log("a.b=",a.b)
    // console.log("a.aaa",a.aaa)
})();
